﻿using System;
using System.Runtime.Serialization;
using UFIDA.U9.WSS.ProxyService.Exceptions;

namespace UFIDA.U9.WSS.DebugService
{
    /// <summary>
    ///     通用异常
    /// </summary>
    public class CommonException : WSException
    {
        /// <summary>
        ///     通用异常编码
        /// </summary>
        public const int CommonExceptionCode = -5100;

        public CommonException() : base(CommonExceptionCode)
        {
        }

        public CommonException(string msg) : base(CommonExceptionCode, msg)
        {
        }

        public CommonException(string msg, Exception inner) : base(CommonExceptionCode, msg, inner)
        {
        }

        protected CommonException(SerializationInfo info, StreamingContext context) : base(CommonExceptionCode,
            info, context)
        {
        }
    }

    /// <summary>
    ///     通用查询异常
    /// </summary>
    public class CommonQueryException : WSException
    {
        /// <summary>
        ///     通用异常编码
        /// </summary>
        public const int CommonExceptionCode = -5101;

        public CommonQueryException() : base(CommonExceptionCode)
        {
        }

        public CommonQueryException(string msg) : base(CommonExceptionCode, msg)
        {
        }

        public CommonQueryException(string msg, Exception inner) : base(CommonExceptionCode, msg, inner)
        {
        }

        protected CommonQueryException(SerializationInfo info, StreamingContext context) : base(CommonExceptionCode,
            info, context)
        {
        }
    }
}